package about_struct

import "fmt"

type student struct{age int;name string;class_no int ;sex string}

func Test()  {
	foo()
}


func foo()  {
	a := student{age:15,name:"jack"}
	b := student{15,"ALikce",2,"Male"}
	fmt.Println(a,b)
}


//未命名类型可以赋值给底层一样的结构体 
func foo1()  {
	type A map[int]string
	type B map[int]string
	t := map[int]string{1:"hellow"} // 为命名t 赋值给了A类型的 对象 a
	var a A = t
	//var i A = B{...}  命名类型赋值 -> 必然报错
	fmt.Println(a)

	
}